
public class Ship extends Actor{

	private Weapon[] w;
	
	private int hp;
	private int shield;
	
	private boolean isInvulnerable;
	
	public Ship(){}
	public Ship(Level cc, String cifn, int cx, int cy, int cw, int cd){
		super(cc,cifn,cx,cy,cw,cd);
	}
	
	public Weapon[] getWeaponArray(){return w;}
	public Weapon getWeaponAt(int gwa){
		if(w != null)
		{
			if((gwa >= 0) && (gwa < w.length))
			{
				return w[gwa];
			}
		}
		return null;
	}
	public int getHP(){return hp;}
	public int getShield(){return shield;}
	public boolean getIsInvulnerable(){return isInvulnerable;}
	
	public void setWeaponArray(Weapon[] swa){w = swa;}
	public void setWeaponAt(Weapon sw, int swi){
		if(w != null)
		{
			if((w.length > swi) && (swi >= 0))
			{
				w[swi] = sw;
			}
		}
	}
	public void setHP(int shp){hp = shp;}
	public void setShield(int ss){shield = ss;}
	public void setIsInvulnerable(boolean sii){isInvulnerable = sii;}
}
